<template>
  <transition name="fade">
    <div class="toast" v-show="toast.show">{{ toast.text }}</div>
  </transition>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
  computed: {
    ...mapGetters(['toast']),
  },
};
</script>
<style scoped lang="stylus">
@import "~common/stylus/variable"
.toast
  position fixed
  bottom 70px
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 12px;
  z-index: 300;
  font-size: 14px;
  color: #000
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  border-radius: 8px;
  box-sizing: border-box;

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}
</style>
